Function at 0x51d0d0
Capabilities:
Contain obfuscated stackstrings
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x778b31
mov eax, dword fs:[0]
push eax
sub esp, 0x490
mov eax, dword [0x84dea4]
xor eax, esp
mov dword [esp + 0x48c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x84dea4]
xor eax, esp
push eax
lea eax, [esp + 0x4a4]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 4]
call fcn.0040ad50
test eax, eax
jne 0x51d125
mov dword [esi + 0x20], 1
jmp 0x51d90e
mov eax, dword [esi + 0x180]
xor edi, edi
cmp eax, edi
mov dword [esi + 0x20], edi
je 0x51d142
push eax
mov ecx, esi
call fcn.0051cb40
mov dword [esi + 0x180], edi
mov ecx, dword [esi + 0xc]
cmp ecx, edi
je 0x51d90e
call fcn.00510f60
mov al, byte [eax + 0x1d0]
mov byte [esp + 0x17], al
mov eax, 0xdeadbeef
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [0x83c898]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], edi
push str.WESTRING_TERRAIN
push edi
push edi
mov ecx, esi
mov dword [esp + 0x4b8], edi
call fcn.0051c720
push str.WESTRING_TEXTURE
push 0xffff
push eax
mov ecx, esi
mov dword [esi + 0x180], eax
call fcn.0051c720
mov ebp, eax
mov eax, 0xdeadbeef
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [0x83c898]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], 6
call fcn.004ba790
mov dword [esp + 0x18], eax
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], edi
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esi + 0xc]
mov byte [esp + 0x4b0], 1
call fcn.00510f60
mov ecx, eax
call fcn.00591ab0
mov eax, dword [esp + 0x54]
xor ebx, ebx
cmp eax, edi
mov dword [esp + 0x80], eax
jle 0x51d360
mov eax, dword [esp + 0x58]
mov ecx, dword [eax + ebx*4]
push 0x104
lea edx, [esp + 0x198]
push edx
push ecx
mov ecx, dword [esp + 0x24]
call fcn.004f49c0
mov edx, dword [esp + 0x58]
mov eax, dword [edx + ebx*4]
mov ecx, dword [esp + 0x18]
push eax
call fcn.004f49e0
test eax, eax
jne 0x51d2d7
push edi
push 0x104
lea edx, [esp + 0x2a0]
mov ecx, str.WESTRING_UNBUILDABLE
call fcn.004da2f0
lea ecx, [esp + 0x298]
push ecx
push str.___s_
lea edx, [esp + 0x3a4]
push 0x104
push edx
call sub.Storm.dll_Ordinal_578
add esp, 0x10
push Ordinal_2
lea eax, [esp + 0x3a0]
push eax
lea ecx, [esp + 0x19c]
push ecx
call sub.Storm.dll_Ordinal_503
mov edx, dword [esp + 0x58]
mov eax, dword [edx + ebx*4]
lea ecx, [esp + 0x1c]
push ecx
push edi
lea edx, [esp + 0x19c]
push edx
push ebp
mov ecx, esi
mov dword [esp + 0x38], eax
call fcn.0051cfd0
mov ecx, dword [esp + 0x58]
mov ecx, dword [ecx + ebx*4]
push edi
mov dword [esp + 0x50], eax
push edi
lea eax, [esp + 0x68]
push eax
push 0x10
mov edx, 0x10
call fcn.004de690
mov eax, dword [esp + 0x68]
push 1
lea edx, [esp + 0x8c]
push edx
push 1
mov edx, 0x10
push eax
mov ecx, edx
mov dword [esp + 0x98], edi
call fcn.004dbad0
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x4c]
push ecx
mov ecx, dword [esi + 4]
push 0x10
push 0x10
push edx
call fcn.00413e60
add ebx, 1
cmp ebx, dword [esp + 0x80]
jl 0x51d251
push edi
push 0x104
lea eax, [esp + 0x19c]
push eax
mov edx, str.Blight
mov ecx, str.MiscBrushes
call fcn.004b8a70
lea ecx, [esp + 0x1c]
push ecx
push edi
lea edx, [esp + 0x19c]
push edx
push ebp
mov ecx, esi
mov dword [esp + 0x38], 0x424c4947
call fcn.0051cfd0
mov cl, byte [esp + 0x17]
mov ebx, eax
lea eax, [esp + 0x60]
push eax
push 0x10
mov edx, 0x10
call fcn.004de9a0
mov edx, dword [esp + 0x68]
push 1
lea ecx, [esp + 0x84]
push ecx
push 1
push edx
mov edx, 0x10
mov ecx, edx
mov dword [esp + 0x90], edi
call fcn.004dbad0
mov eax, dword [esp + 0x68]
mov ecx, dword [esi + 4]
push eax
push 0x10
push 0x10
push ebx
call fcn.00413e60
push edi
push 0x104
lea ecx, [esp + 0x19c]
push ecx
mov edx, str.Nothing
mov ecx, str.MiscBrushes
call fcn.004b8a70
push 1
push 0x104
lea edx, [esp + 0x98]
push edx
mov edx, str.Nothing
mov ecx, str.MiscBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea eax, [esp + 0x98]
push eax
call sub.Storm.dll_Ordinal_503
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0x19c]
push eax
push ebp
mov ecx, esi
mov dword [esp + 0x38], 0x4e4f5448
call fcn.0051cfd0
push edi
push 0x104
lea ecx, [esp + 0x19c]
push ecx
mov edx, str.Unnothing
mov ecx, str.MiscBrushes
call fcn.004b8a70
push 1
lea edx, [esp + 0x94]
push 0x104
push edx
mov edx, str.Unnothing
mov ecx, str.MiscBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea eax, [esp + 0x98]
push eax
call sub.Storm.dll_Ordinal_503
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0x19c]
push eax
push ebp
mov ecx, esi
mov dword [esp + 0x38], 0x4e4f5452
call fcn.0051cfd0
call fcn.004ba820
mov ebp, eax
mov dword [esp + 0x80], ebp
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
mov dword [esp + 0x78], edi
mov dword [esp + 0x7c], edi
lea ecx, [esp + 0x70]
push ecx
lea edx, [esp + 0x54]
push edx
mov ecx, ebp
mov byte [esp + 0x4b4], 2
call fcn.004f6f90
xor edx, edx
lea ecx, [esp + 0x70]
call fcn.004be560
mov eax, 0xdeadbeef
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [0x83c898]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x74]
xor ebx, ebx
cmp eax, edi
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], 6
mov dword [esp + 0x4c], eax
mov dword [esp + 0x18], ebx
jle 0x51d7d7
jmp 0x51d57b
mov ebp, dword [esp + 0x80]
mov ebx, dword [esp + 0x18]
mov ecx, dword [esp + 0x78]
mov edx, dword [ecx + ebx*4]
push edi
push 0x104
lea eax, [esp + 0x19c]
push eax
push edx
mov ecx, ebp
call fcn.004f6ed0
mov ecx, dword [esi + 0x180]
lea eax, [esp + 0x194]
push eax
push 0xffff
push ecx
mov ecx, esi
call fcn.0051c720
mov edx, dword [esp + 0x78]
mov ebp, eax
mov eax, dword [edx + ebx*4]
mov dword [esp + 0x30], eax
xor ebx, ebx
push ebx
push 0x79a340
lea ecx, [esp + 0x90]
push 5
push ecx
call sub.Storm.dll_Ordinal_578
add esp, 0x10
push edi
push 0x104
lea edx, [esp + 0x19c]
push edx
lea edx, [esp + 0x94]
mov ecx, str.CliffBrushes
call fcn.004b8a70
push 1
push 0x104
lea eax, [esp + 0x98]
push eax
lea edx, [esp + 0x94]
mov ecx, str.CliffBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea ecx, [esp + 0x98]
push ecx
call sub.Storm.dll_Ordinal_503
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x19c]
push ecx
push ebp
mov ecx, esi
mov dword [esp + 0x3c], ebx
call fcn.0051cfd0
add ebx, 1
cmp ebx, 4
jle 0x51d5c2
push edi
push 0x104
lea edx, [esp + 0x19c]
push edx
mov edx, str.DeepWater
mov ecx, str.MiscBrushes
call fcn.004b8a70
push 1
push 0x104
lea eax, [esp + 0x98]
push eax
mov edx, str.DeepWater
mov ecx, str.MiscBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea ecx, [esp + 0x98]
push ecx
call sub.Storm.dll_Ordinal_503
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x19c]
push ecx
push ebp
mov ecx, esi
mov dword [esp + 0x3c], 5
call fcn.0051cfd0
push edi
push 0x104
lea edx, [esp + 0x19c]
push edx
mov edx, str.ShallowWater
mov ecx, str.MiscBrushes
call fcn.004b8a70
push 1
push 0x104
lea eax, [esp + 0x98]
push eax
mov edx, str.ShallowWater
mov ecx, str.MiscBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea ecx, [esp + 0x98]
push ecx
call sub.Storm.dll_Ordinal_503
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x19c]
push ecx
push ebp
mov ecx, esi
mov dword [esp + 0x3c], 6
call fcn.0051cfd0
push edi
push 0x104
lea edx, [esp + 0x19c]
push edx
mov edx, str.Ramp
mov ecx, str.MiscBrushes
call fcn.004b8a70
push 1
push 0x104
lea eax, [esp + 0x98]
push eax
mov edx, str.Ramp
mov ecx, str.MiscBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea ecx, [esp + 0x98]
push ecx
call sub.Storm.dll_Ordinal_503
lea edx, [esp + 0x1c]
mov dword [esp + 0x2c], 7
push edx
lea eax, [esp + 0x94]
push eax
lea ecx, [esp + 0x19c]
push ecx
push ebp
mov ecx, esi
call fcn.0051cfd0
mov eax, dword [esp + 0x18]
add eax, 1
cmp eax, dword [esp + 0x4c]
mov dword [esp + 0x18], eax
jl 0x51d570
mov edx, dword [esi + 0x180]
push str.WESTRING_HEIGHT
push 0xffff
push edx
mov ecx, esi
call fcn.0051c720
mov ebp, eax
mov eax, 0xdeadbeef
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov eax, dword [0x83c898]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x1c], 6
xor ebx, ebx
push ebx
push 0x79a340
lea eax, [esp + 0x88]
push 5
push eax
call sub.Storm.dll_Ordinal_578
add esp, 0x10
push edi
push 0x104
lea ecx, [esp + 0x19c]
push ecx
lea edx, [esp + 0x8c]
mov ecx, str.HeightBrushes
call fcn.004b8a70
push 1
push 0x104
lea edx, [esp + 0x98]
push edx
lea edx, [esp + 0x8c]
mov ecx, str.HeightBrushes
call fcn.004b8a70
push Ordinal_2
push 0x7a76f0
lea eax, [esp + 0x98]
push eax
call sub.Storm.dll_Ordinal_503
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x94]
push edx
lea eax, [esp + 0x19c]
push eax
push ebp
mov ecx, esi
mov dword [esp + 0x44], ebx
call fcn.0051cfd0
add ebx, 1
cmp ebx, 5
jl 0x51d831
mov eax, dword [esp + 0x78]
cmp eax, edi
je 0x51d8e2
push edi
push 0xfffffffffffffffe
push 0x829be4
push eax
call sub.Storm.dll_Ordinal_403
mov eax, dword [esp + 0x58]
cmp eax, edi
je 0x51d8f8
push edi
push 0xfffffffffffffffe
push 0x829be4
push eax
call sub.Storm.dll_Ordinal_403
mov eax, dword [esp + 0x68]
cmp eax, edi
je 0x51d90e
push edi
push 0xfffffffffffffffe
push str.._AVCImVector_NTempest__
push eax
call sub.Storm.dll_Ordinal_403
mov ecx, dword [esp + 0x4a4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x48c]
xor ecx, esp
call fcn.00735f58
add esp, 0x49c
ret