Function at 0x10002d40
Capabilities:
Create directory
Read .ini file
Resolve function by parsing pe exports
Write file on windows

Disassembly:
sub esp, 0x348
mov eax, dword [0x10082594]
xor eax, esp
mov dword [esp + 0x344], eax
push ebx
push ebp
mov ebp, dword [esp + 0x374]
push esi
xor ebx, ebx
push edi
mov edi, dword [esp + 0x380]
mov dword [esp + 0x3c], ebp
cmp dword [0x10080148], ebx
je 0x10002e55
call fcn.10025010
push eax
lea eax, [esp + 0x150]
push str._sdxwnd.ini
push eax
call fcn.10047c21
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
add esp, 0xc
lea ecx, [esp + 0x14c]
push ecx
push ebx
push str.MinTexX
push str.Texture
call esi
lea edx, [esp + 0x14c]
push edx
push ebx
push str.MaxTexX
push str.Texture
mov dword [0x10083a68], eax
call esi
mov dword [0x10083a64], eax
lea eax, [esp + 0x14c]
push eax
push ebx
push str.MinTexY
push str.Texture
call esi
lea ecx, [esp + 0x14c]
push ecx
push ebx
push str.MaxTexY
push str.Texture
mov dword [0x10083a60], eax
call esi
mov edx, dword [0x10083a64]
mov ecx, dword [0x10083a68]
push eax
push edx
mov dword [0x10083a5c], eax
mov eax, dword [0x10083a60]
push eax
push ecx
push str.TextureDump:_size_min__dx_d__max__dx_d__n
call fcn.10025250
call fcn.10025010
push eax
push str._s_texture.out
lea edx, [esp + 0x26c]
push 0x104
push edx
call fcn.10047c9e
add esp, 0x24
push ebx
lea eax, [esp + 0x254]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov dword [0x10080148], ebx
mov eax, dword [0x10083a68]
mov ecx, dword [esp + 0x374]
cmp eax, ebx
je 0x10002e69
cmp ecx, eax
jl 0x10002e7e
mov edx, dword [0x10083a60]
mov eax, dword [esp + 0x378]
cmp edx, ebx
je 0x10002e8d
cmp eax, edx
jge 0x10002e8d
push str.TextureDump:_SKIP_small_texture_n
call fcn.10025250
jmp 0x10003c3f
mov edx, dword [0x10083a64]
cmp edx, ebx
je 0x10002e9b
cmp ecx, edx
jg 0x10002ea9
mov edx, dword [0x10083a5c]
cmp edx, ebx
je 0x10002eb8
cmp eax, edx
jle 0x10002eb8
push str.TextureDump:_SKIP_big_texture_n
call fcn.10025250
jmp 0x10003c3f
mov edx, dword [esp + 0x35c]
cmp edx, 0x6e
jg 0x10002ee8
je case.0x10002ed9.60
lea esi, [edx - 0x15]
cmp esi, 0x2e
ja case.0x10002ed9.27
movzx esi, byte [esi + 0x10003c68]
jmp dword [esi*4 + 0x10003c5c]
push eax
push ecx
push ebp
jmp 0x10002f9f
cmp edx, 0x33545844
jg 0x10002f2c
je 0x10002f8e
cmp edx, 0x75
je case.0x10002ed9.60
cmp edx, 0x31545844
je 0x10002f0f
cmp edx, 0x32545844
jmp 0x10002f3a
push eax
mov eax, 0xaaaaaaab
mul ecx
shr edx, 2
push edx
mov eax, 0x2aaaaaab
imul ebp
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
jmp 0x10002f9f
cmp edx, 0x34545844
je 0x10002f8e
cmp edx, 0x35545844
je 0x10002f8e
cmp dword [0x10080144], ebx
je case.0x10002ed9.60
push edx
call fcn.100027b0
push eax
push edx
push str.Unhandled_texture_type_d__s_
lea edx, [esp + 0x108]
push 0x50
push edx
call fcn.10047c9e
add esp, 0x18
push 0x30
push str.WARN
lea eax, [esp + 0x100]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
push str.TextureDump:_hashNULL_n
mov dword [0x10080144], ebx
call fcn.10025250
jmp 0x10003c3f
push eax
mov eax, ebp
cdq
and edx, 3
shr ecx, 2
add eax, edx
push ecx
sar eax, 2
push eax
push edi
call fcn.10013fd0
add esp, 0x10
cmp eax, ebx
jne 0x10002fbb
push str.TextureDump:_hashNULL_n
call fcn.10025250
jmp 0x10003c3f
mov ecx, dword [esp + 0x35c]
push eax
push ecx
call fcn.100027b0
mov edx, dword [esp + 0x380]
add esp, 4
push eax
mov eax, dword [esp + 0x37c]
push edx
push eax
call fcn.10025010
push eax
push str._s_texture.out_texture._03d._03d._s._08X.bmp
lea ecx, [esp + 0x268]
push 0x104
push ecx
call fcn.10047c9e
lea edx, [esp + 0x270]
push 0x1005eeb4
push edx
call fcn.10047a23
mov ebp, eax
add esp, 0x28
mov dword [esp + 0x30], ebp
cmp ebp, ebx
je 0x10003c42
push 0x6c
xor esi, esi
lea eax, [esp + 0x80]
push esi
push eax
call fcn.10048620
mov ecx, dword [esp + 0x380]
mov ebx, 1
mov eax, 0x4d42
mov word [esp + 0x78], ax
xor eax, eax
mov edx, ebx
mov word [esp + 0x94], dx
xor edx, edx
mov word [esp + 0x80], ax
mov eax, dword [esp + 0x368]
add esp, 0xc
cmp eax, 0x32
mov word [esp + 0x72], dx
mov dword [esp + 0x7c], 0x6c
mov dword [esp + 0x80], ecx
mov dword [esp + 0x8c], 3
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], esi
mov dword [esp + 0xa0], esi
mov dword [esp + 0xb4], esi
lea edx, [esi + 0x1f]
jg 0x10003169
je case.0x100030cc.21
add eax, 0xffffffeb
cmp eax, 9
ja case.0x100030cc.27
movzx eax, byte [eax + 0x10003cac]
jmp dword [eax*4 + 0x10003c98]
mov eax, 0x10
mov dword [esp + 0xa4], 0xf00
mov dword [esp + 0xa8], pe_nt_image_headers32
mov dword [esp + 0xac], 0xf
mov dword [esp + 0xb0], 0xf000
jmp 0x100031ec
mov eax, 0x10
mov dword [esp + 0xa4], 0x7c00
mov dword [esp + 0xa8], 0x3e0
mov dword [esp + 0xac], edx
mov dword [esp + 0xb0], 0x8000
jmp 0x100031ec
mov eax, 0x10
mov dword [esp + 0xa4], 0x7c00
mov dword [esp + 0xa8], 0x3e0
mov dword [esp + 0xac], edx
mov dword [esp + 0xb0], esi
jmp 0x100031ec
cmp eax, 0x33545844
jg 0x100031ad
je case.0x100030cc.21
cmp eax, 0x31545844
je 0x10003182
cmp eax, 0x32545844
je case.0x100030cc.21
jmp case.0x100030cc.27
mov eax, 0x10
mov dword [esp + 0xa4], 0xf800
mov dword [esp + 0xa8], 0x7e0
mov dword [esp + 0xac], edx
mov dword [esp + 0xb0], esi
jmp 0x100031ec
cmp eax, 0x34545844
je case.0x100030cc.21
cmp eax, 0x35545844
jne case.0x100030cc.27
mov eax, 0x20
mov dword [esp + 0xa4], 0xff0000
mov dword [esp + 0xa8], 0xff00
mov dword [esp + 0xac], 0xff
mov dword [esp + 0xb0], 0xff000000
mov word [esp + 0x8a], ax
movzx eax, word [esp + 0x8a]
imul eax, ecx
add eax, edx
and eax, 0xffffffe0
cdq
and edx, 7
add eax, edx
mov esi, eax
mov eax, dword [esp + 0x378]
sar esi, 3
mov ecx, esi
imul ecx, eax
mov dword [esp + 0x90], ecx
push ebp
add ecx, 0x7a
push ebx
mov dword [esp + 0x76], ecx
lea ecx, [esp + 0x74]
neg eax
push 0xe
push ecx
mov dword [esp + 0x94], eax
mov dword [esp + 0x86], 0x7a
call fcn.100478dd
mov edx, dword [esp + 0xac]
push ebp
push ebx
lea eax, [edx*4 + 0x6c]
push eax
lea ecx, [esp + 0x98]
push ecx
call fcn.100478dd
mov eax, dword [esp + 0x37c]
add esp, 0x20
cmp eax, 0x31545844
jg 0x100034b8
je 0x10003343
add eax, 0xffffffeb
cmp eax, 0x1d
ja case.0x10003297.27
movzx edx, byte [eax + 0x10003cc4]
jmp dword [edx*4 + 0x10003cb8]
xor ebp, ebp
cmp dword [esp + 0x378], ebp
jle case.0x10003297.27
lea ecx, [ecx]
mov eax, dword [esp + 0x30]
push eax
push ebx
push esi
push edi
call fcn.100478dd
add edi, dword [esp + 0x4c]
add ebp, ebx
add esp, 0x10
cmp ebp, dword [esp + 0x378]
jl 0x100032b0
jmp case.0x10003297.27
xor ebp, ebp
cmp dword [esp + 0x378], ebp
jle case.0x10003297.27
mov eax, dword [esp + 0x374]
lea ebx, [ebx]
xor esi, esi
test eax, eax
jle 0x10003333
movzx eax, byte [edi]
mov edx, dword [esp + 0x30]
mov ecx, eax
or ecx, 0xffffff00
shl ecx, 8
or ecx, eax
push edx
shl ecx, 8
or ecx, eax
push ebx
lea eax, [esp + 0x30]
push 4
push eax
mov dword [esp + 0x38], ecx
call fcn.100478dd
mov eax, dword [esp + 0x384]
add esi, ebx
add esp, 0x10
add edi, ebx
cmp esi, eax
jl 0x100032f6
add ebp, ebx
cmp ebp, dword [esp + 0x378]
jl 0x100032f0
jmp case.0x10003297.27
mov esi, dword [esp + 0x378]
imul esi, dword [esp + 0x374]
add esi, esi
push esi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], esi
call fcn.10047530
xor ebx, ebx
add esp, 4
cmp dword [esp + 0x378], ebx
mov edi, eax
mov dword [esp + 0x2c], edi
jle 0x100034a4
mov ebp, dword [esp + 0x374]
mov edi, dword [esp + 0x3c]
jmp 0x10003390
mov dword [esp + 0x14], 0
test ebp, ebp
jle 0x1000348c
mov eax, dword [esp + 0x1c]
cdq
sub eax, edx
sar eax, 1
mov dword [esp + 0x38], eax
lea ecx, [ecx]
mov eax, dword [esp + 0x18]
movzx esi, word [eax]
movzx edx, word [eax + 2]
add eax, 2
add eax, 2
mov dword [esp + 0x18], eax
mov ecx, esi
mov eax, edx
mov dword [esp + 0x20], esi
mov dword [esp + 0x28], edx
call fcn.10002b50
movzx ecx, ax
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x28]
mov eax, esi
call fcn.10002b50
movzx edx, ax
mov dword [esp + 0x34], edx
xor esi, esi
mov eax, dword [esp + 0x18]
movzx ecx, word [eax]
add eax, 2
mov dword [esp + 0x24], ecx
mov dword [esp + 0x18], eax
xor ecx, ecx
mov eax, dword [esp + 0x24]
and eax, 3
cmp eax, 3
ja case.default.0x10003411
jmp dword [eax*4 + 0x10003ce4]
movzx edi, word [esp + 0x20]
jmp case.default.0x10003411
movzx edi, word [esp + 0x28]
jmp case.default.0x10003411
movzx edi, word [esp + 0x10]
jmp case.default.0x10003411
movzx edi, word [esp + 0x34]
shr word [esp + 0x24], 2
xor edx, edx
cmp ecx, 4
setge dl
mov eax, ecx
and eax, 3
add edx, esi
add edx, ebx
imul edx, ebp
add edx, dword [esp + 0x14]
add eax, edx
cmp eax, dword [esp + 0x38]
jge 0x10003467
mov edx, dword [esp + 0x2c]
mov word [edx + eax*2], di
mov ebp, dword [esp + 0x374]
inc ecx
cmp ecx, 8
jl 0x10003405
add esi, 2
cmp esi, 4
jl 0x100033f1
mov eax, dword [esp + 0x14]
add eax, 4
cmp eax, ebp
mov dword [esp + 0x14], eax
jl 0x100033b0
add ebx, 4
cmp ebx, dword [esp + 0x378]
jl 0x10003390
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x30]
push eax
push 1
push esi
push edi
call fcn.100478dd
push edi
jmp 0x10003c2d
cmp eax, 0x34545844
jg 0x1000380b
je 0x10003816
cmp eax, 0x32545844
je 0x100034db
cmp eax, 0x33545844
jne case.0x10003297.27
mov ebp, dword [esp + 0x378]
imul ebp, dword [esp + 0x374]
add ebp, ebp
add ebp, ebp
push ebp
mov esi, edi
mov dword [esp + 0x3c], ebp
call fcn.10047530
push ebp
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x28], ebx
call fcn.10048620
add esp, 0x10
cmp dword [esp + 0x378], 0
mov dword [esp + 0x28], 0
jle 0x100037f7
mov edi, dword [esp + 0x374]
lea esp, [esp]
mov dword [esp + 0x14], 0
test edi, edi
jle 0x100037df
mov eax, ebp
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x24], eax
nop
xor eax, eax
movzx ecx, word [esi]
mov dword [esp + 0x10], ecx
shr word [esp + 0x10], 4
mov dl, cl
movzx ecx, byte [esp + 0x10]
shr word [esp + 0x10], 4
and dl, 0xf
mov byte [esp + eax*4 + 0xe8], dl
and cl, 0xf
mov byte [esp + eax*4 + 0xe9], cl
mov cl, byte [esp + 0x10]
mov dl, cl
shr cl, 4
and dl, 0xf
and cl, 0xf
mov byte [esp + eax*4 + 0xea], dl
mov byte [esp + eax*4 + 0xeb], cl
inc eax
add esi, 2
cmp eax, 4
jl 0x10003552
movzx ebp, word [esi]
movzx ebx, word [esi + 2]
add esi, 2
mov ecx, ebp
add esi, 2
call fcn.10002c50
mov ecx, ebx
mov dword [esp + 0x3c], eax
call fcn.10002c50
mov dword [esp + 0x40], eax
mov ecx, ebp
mov eax, ebx
call fcn.10002bd0
mov dword [esp + 0x44], eax
mov ecx, ebx
mov eax, ebp
call fcn.10002bd0
xor ecx, ecx
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], ecx
lea esp, [esp]
movzx eax, word [esi]
mov edx, dword [esp + 0x28]
add esi, 2
lea ebp, [edx + ecx]
mov dword [esp + 0x10], eax
mov dword [esp + 0x2c], esi
mov ecx, 1
jmp 0x10003614
mov eax, dword [esp + 0x10]
and eax, 3
mov edx, dword [esp + eax*4 + 0x3c]
xor eax, eax
lea esi, [ecx - 1]
and edx, 0xffffff
cmp esi, 4
setge al
shr word [esp + 0x10], 2
and esi, 3
mov dword [esp + 0x20], eax
add eax, ebp
imul eax, edi
add eax, dword [esp + 0x14]
add eax, esi
cmp eax, dword [esp + 0x24]
jge 0x10003672
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
add edi, ebx
lea esi, [esi + edi*4]
movzx esi, byte [esp + esi + 0xe8]
shl esi, 0x1c
or esi, edx
mov edx, dword [esp + 0x18]
mov dword [edx + eax*4], esi
mov edi, dword [esp + 0x374]
mov eax, dword [esp + 0x10]
and eax, 3
mov edx, dword [esp + eax*4 + 0x3c]
xor eax, eax
and edx, 0xffffff
cmp ecx, 4
setge al
shr word [esp + 0x10], 2
mov esi, ecx
and esi, 3
mov dword [esp + 0x20], eax
add eax, ebp
imul eax, edi
add eax, esi
add eax, dword [esp + 0x14]
cmp eax, dword [esp + 0x24]
jge 0x100036d3
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
add edi, ebx
lea esi, [esi + edi*4]
movzx esi, byte [esp + esi + 0xe8]
shl esi, 0x1c
or esi, edx
mov edx, dword [esp + 0x18]
mov dword [edx + eax*4], esi
mov edi, dword [esp + 0x374]
mov eax, dword [esp + 0x10]
and eax, 3
mov edx, dword [esp + eax*4 + 0x3c]
xor ebx, ebx
lea eax, [ecx + 1]
and edx, 0xffffff
cmp eax, 4
setge bl
shr word [esp + 0x10], 2
lea esi, [ecx + 1]
and esi, 3
mov eax, ebx
mov dword [esp + 0x20], eax
add eax, ebp
imul eax, edi
add eax, dword [esp + 0x14]
add eax, esi
cmp eax, dword [esp + 0x24]
jge 0x10003738
mov edi, ebx
mov ebx, dword [esp + 0x1c]
add edi, ebx
lea esi, [esi + edi*4]
movzx esi, byte [esp + esi + 0xe8]
shl esi, 0x1c
or esi, edx
mov edx, dword [esp + 0x18]
mov dword [edx + eax*4], esi
mov edi, dword [esp + 0x374]
mov eax, dword [esp + 0x10]
and eax, 3
mov edx, dword [esp + eax*4 + 0x3c]
xor ebx, ebx
lea eax, [ecx + 2]
and edx, 0xffffff
cmp eax, 4
setge bl
shr word [esp + 0x10], 2
lea esi, [ecx - 2]
and esi, 3
mov eax, ebx
mov dword [esp + 0x20], eax
add eax, ebp
imul eax, edi
add eax, dword [esp + 0x14]
add eax, esi
cmp eax, dword [esp + 0x24]
jge 0x1000379d
mov edi, ebx
mov ebx, dword [esp + 0x1c]
add edi, ebx
lea esi, [esi + edi*4]
movzx esi, byte [esp + esi + 0xe8]
shl esi, 0x1c
or esi, edx
mov edx, dword [esp + 0x18]
mov dword [edx + eax*4], esi
mov edi, dword [esp + 0x374]
add ecx, 4
lea eax, [ecx - 1]
cmp eax, 8
jl 0x10003610
mov ecx, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
add ecx, 2
cmp ecx, 4
mov dword [esp + 0x1c], ecx
jl 0x100035f0
mov eax, dword [esp + 0x14]
add eax, 4
cmp eax, edi
mov dword [esp + 0x14], eax
jl 0x10003550
mov ebp, dword [esp + 0x38]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
add eax, 4
cmp eax, dword [esp + 0x378]
mov dword [esp + 0x28], eax
jl 0x10003530
mov ecx, dword [esp + 0x30]
push ecx
push 1
push ebp
push ebx
call fcn.100478dd
push ebx
jmp 0x10003c2d
cmp eax, 0x35545844
jne case.0x10003297.27
mov esi, dword [esp + 0x378]
imul esi, dword [esp + 0x374]
add esi, esi
add esi, esi
push esi
mov ebp, edi
mov dword [esp + 0x40], esi
call fcn.10047530
push esi
push 0
push eax
mov dword [esp + 0x30], eax
call fcn.10048620
add esp, 0x10
cmp dword [esp + 0x378], 0
mov dword [esp + 0x1c], 0
jle 0x10003c1a
jmp 0x10003860
cmp dword [esp + 0x374], 0
mov dword [esp + 0x14], 0
jle 0x10003c02
mov eax, esi
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [esp + 0x24], eax
movzx eax, word [ebp]
movzx esi, al
mov ecx, eax
shr ecx, 8
add ebp, 2
mov dword [esp + 0x50], ecx
mov dword [esp + 0x4c], esi
cmp esi, ecx
jbe 0x10003942
lea edx, [esi + esi*2]
lea edi, [ecx + edx*2]
mov eax, 0x24924925
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 2
mov dword [esp + 0x54], edi
lea eax, [esi + esi*4]
lea edi, [eax + ecx*2]
mov eax, 0x24924925
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 2
mov dword [esp + 0x58], edi
lea edx, [ecx + ecx*2]
lea edi, [edx + esi*4]
mov eax, 0x24924925
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 2
mov dword [esp + 0x5c], edi
lea eax, [esi + esi*2]
lea edi, [eax + ecx*4]
mov eax, 0x24924925
mul edi
sub edi, edx
shr edi, 1
add edi, edx
shr edi, 2
mov dword [esp + 0x60], edi
lea edx, [ecx + ecx*4]
lea edi, [edx + esi*2]
mov eax, 0x24924925
mul edi
sub edi, edx
lea eax, [ecx + ecx*2]
lea esi, [esi + eax*2]
shr edi, 1
add edi, edx
mov eax, 0x24924925
mul esi
sub esi, edx
shr esi, 1
shr edi, 2
add esi, edx
shr esi, 2
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], esi
jmp 0x1000399c
lea edx, [ecx + esi*4]
mov eax, 0xcccccccd
mul edx
shr edx, 2
mov dword [esp + 0x54], edx
lea eax, [esi + esi*2]
lea edx, [eax + ecx*2]
mov eax, 0xcccccccd
mul edx
shr edx, 2
mov dword [esp + 0x58], edx
lea eax, [ecx + ecx*2]
lea edx, [eax + esi*2]
mov eax, 0xcccccccd
mul edx
shr edx, 2
mov dword [esp + 0x5c], edx
lea ecx, [esi + ecx*4]
mov eax, 0xcccccccd
mul ecx
shr edx, 2
mov dword [esp + 0x60], edx
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0xff
movzx edi, word [ebp + 6]
mov esi, ebp
add ebp, 6
movzx ebx, word [ebp + 2]
add ebp, 2
mov ecx, edi
add ebp, 2
call fcn.10002c50
mov ecx, ebx
mov dword [esp + 0xe8], eax
call fcn.10002c50
mov dword [esp + 0xec], eax
mov ecx, edi
mov eax, ebx
call fcn.10002bd0
mov dword [esp + 0xf0], eax
mov ecx, ebx
mov eax, edi
call fcn.10002bd0
xor ebx, ebx
mov dword [esp + 0xf4], eax
mov dword [esp + 0x2c], ebx
jmp 0x100039f7
mov esi, dword [esp + 0x38]
movzx eax, byte [esi + 2]
movzx edx, byte [esi + 1]
movzx ecx, byte [esi]
shl eax, 8
or eax, edx
movzx edx, word [ebp]
shl eax, 8
or eax, ecx
add esi, 3
add ebp, 2
mov dword [esp + 0x38], esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x28], ebp
mov ecx, 1
jmp 0x10003a34
mov edx, dword [esp + 0x10]
shr word [esp + 0x10], 2
and edx, 3
mov edi, dword [esp + edx*4 + 0xe8]
mov esi, eax
and esi, 7
mov ebp, dword [esp + esi*4 + 0x4c]
xor edx, edx
lea esi, [ecx - 1]
shl ebp, 0x18
shr eax, 3
and edi, 0xffffff
cmp esi, 4
setge dl
and esi, 3
add edx, ebx
add edx, dword [esp + 0x1c]
imul edx, dword [esp + 0x374]
add edx, dword [esp + 0x14]
add esi, edx
cmp esi, dword [esp + 0x24]
jge 0x10003a8a
mov edx, dword [esp + 0x20]
or edi, ebp
mov dword [edx + esi*4], edi
mov ebx, dword [esp + 0x2c]
mov edx, eax
and edx, 7
mov edx, dword [esp + edx*4 + 0x4c]
shl edx, 0x18
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
shr word [esp + 0x10], 2
and edx, 3
mov edi, dword [esp + edx*4 + 0xe8]
xor edx, edx
shr eax, 3
and edi, 0xffffff
cmp ecx, 4
setge dl
mov esi, ecx
and esi, 3
add edx, ebx
add edx, dword [esp + 0x1c]
imul edx, dword [esp + 0x374]
add edx, dword [esp + 0x14]
add esi, edx
cmp esi, dword [esp + 0x24]
jge 0x10003aed
or edi, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [edx + esi*4], edi
mov edx, eax
and edx, 7
mov edx, dword [esp + edx*4 + 0x4c]
shl edx, 0x18
shr eax, 3
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
shr word [esp + 0x10], 2
and edx, 3
mov edi, dword [esp + edx*4 + 0xe8]
mov dword [esp + 0x34], eax
xor eax, eax
and edi, 0xffffff
lea edx, [ecx + 1]
cmp edx, 4
setge al
lea esi, [ecx + 1]
and esi, 3
add eax, ebx
add eax, dword [esp + 0x1c]
imul eax, dword [esp + 0x374]
add eax, dword [esp + 0x14]
add esi, eax
cmp esi, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
jge 0x10003b58
or edi, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [edx + esi*4], edi
mov edx, eax
and edx, 7
mov edx, dword [esp + edx*4 + 0x4c]
shl edx, 0x18
shr eax, 3
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x10]
shr word [esp + 0x10], 2
and edx, 3
mov edi, dword [esp + edx*4 + 0xe8]
mov dword [esp + 0x34], eax
xor eax, eax
and edi, 0xffffff
lea edx, [ecx + 2]
cmp edx, 4
setge al
lea esi, [ecx - 2]
and esi, 3
add eax, ebx
add eax, dword [esp + 0x1c]
imul eax, dword [esp + 0x374]
add eax, dword [esp + 0x14]
add esi, eax
cmp esi, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
jge 0x10003bc3
or edi, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [edx + esi*4], edi
add ecx, 4
lea edx, [ecx - 1]
cmp edx, 8
jl 0x10003a30
mov ebp, dword [esp + 0x28]
add ebx, 2
cmp ebx, 4
mov dword [esp + 0x2c], ebx
jl 0x100039f3
mov eax, dword [esp + 0x14]
add eax, 4
cmp eax, dword [esp + 0x374]
mov dword [esp + 0x14], eax
jl 0x10003885
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
add eax, 4
cmp eax, dword [esp + 0x378]
mov dword [esp + 0x1c], eax
jl 0x10003860
mov eax, dword [esp + 0x30]
push eax
push 1
push esi
mov esi, dword [esp + 0x2c]
push esi
call fcn.100478dd
push esi
call fcn.100475fa
add esp, 0x14
mov ecx, dword [esp + 0x30]
push ecx
call fcn.100476ff
add esp, 4
mov ecx, dword [esp + 0x354]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10047cbc
add esp, 0x348
ret